﻿<%@ Page Title="Browse" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Browse.aspx.vb" Inherits="CS290_Capstone_Project.About" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    
    <h2>
        Browse
    </h2>





  <!--  <p>
    <h3>Here you can browse through these languages</h3> 
    <br />To begin browsing select a language or a combination of languages you would like to look through. 
    <br />
    </p>

    <hr />
    
    <p>
        <asp:CheckBox ID="cbJava" runat="server" Value="Java" Text="Java" /><br />
        <asp:CheckBox ID="cbVBNet" runat="server" Value="VB.Net" Text="VB.Net"/><br />
        <asp:CheckBox ID="cbPython" runat="server" Value="Python" Text="Python"/><br />
        <asp:CheckBox ID="cbVB" runat="server" Value="Visual Basic" Text="Visual Basic"/><br />
        <asp:CheckBox ID="cbXml" runat="server" Value="XML, XSLT, XPATH" Text="XML, XSLT, XPATH"/>
        <br />
        <br />
        <asp:Button ID="btnBrowse" runat="server" Value="Browse" Text="Browse" />

        </p>-->
<asp:ListView ID="CommentsDataSource" runat="server" DataSourceID="SqlDataSource4">
     <LayoutTemplate>
          <table runat="server">
              <tr runat="server">
                  <td runat="server">
                      <table ID="itemPlaceholderContainer" runat="server" border="0" style="">
                          <tr runat="server" style="">
                              <th runat="server">
                                  UserName</th>
                              <th runat="server">
                                  Subject</th>
                              <th runat="server">
                                  body</th>
                              <th runat="server">
                                  CommentDate</th>
                          </tr>
                          <tr ID="itemPlaceholder" runat="server">
                          </tr>
                      </table>
                  </td>
              </tr>
              <tr runat="server">
                  <td runat="server" style="">
                  </td>
              </tr>
          </table>
     </LayoutTemplate>
     <AlternatingItemTemplate>
         <tr style="">
             <td>
                 <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
             </td>
             <td>
                 <asp:Label ID="SubjectLabel" runat="server" Text='<%# Eval("Subject") %>' />
             </td>
             <td>
                 <asp:Label ID="bodyLabel" runat="server" Text='<%# Eval("body") %>' />
             </td>
             <td>
                 <asp:Label ID="CommentDateLabel" runat="server" 
                     Text='<%# Eval("CommentDate") %>' />
             </td>
         </tr>
     </AlternatingItemTemplate>
     <EditItemTemplate>
         <tr style="">
             <td>
                 <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                     Text="Update" />
                 <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                     Text="Cancel" />
             </td>
             <td>
                 <asp:TextBox ID="UserNameTextBox" runat="server" 
                     Text='<%# Bind("UserName") %>' />
             </td>
             <td>
                 <asp:TextBox ID="SubjectTextBox" runat="server" Text='<%# Bind("Subject") %>' />
             </td>
             <td>
                 <asp:TextBox ID="bodyTextBox" runat="server" Text='<%# Bind("body") %>' />
             </td>
             <td>
                 <asp:TextBox ID="CommentDateTextBox" runat="server" 
                     Text='<%# Bind("CommentDate") %>' />
             </td>
         </tr>
     </EditItemTemplate>
     <EmptyDataTemplate>
         <table runat="server" style="">
             <tr>
                 <td>
                     No data was returned.</td>
             </tr>
         </table>
     </EmptyDataTemplate>
     <InsertItemTemplate>
         <tr style="">
             <td>
                 <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                     Text="Insert" />
                 <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                     Text="Clear" />
             </td>
             <td>
                 <asp:TextBox ID="UserNameTextBox" runat="server" 
                     Text='<%# Bind("UserName") %>' />
             </td>
             <td>
                 <asp:TextBox ID="SubjectTextBox" runat="server" Text='<%# Bind("Subject") %>' />
             </td>
             <td>
                 <asp:TextBox ID="bodyTextBox" runat="server" Text='<%# Bind("body") %>' />
             </td>
             <td>
                 <asp:TextBox ID="CommentDateTextBox" runat="server" 
                     Text='<%# Bind("CommentDate") %>' />
             </td>
         </tr>
     </InsertItemTemplate>
     <ItemTemplate>
          <tr style="">
              <td>
                  <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
              </td>
              <td>
                  <asp:Label ID="SubjectLabel" runat="server" Text='<%# Eval("Subject") %>' />
              </td>
              <td>
                  <asp:Label ID="bodyLabel" runat="server" Text='<%# Eval("body") %>' />
              </td>
              <td>
                  <asp:Label ID="CommentDateLabel" runat="server" 
                      Text='<%# Eval("CommentDate") %>' />
              </td>
          </tr>
     </ItemTemplate>

     <SelectedItemTemplate>
         <tr style="">
             <td>
                 <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
             </td>
             <td>
                 <asp:Label ID="SubjectLabel" runat="server" Text='<%# Eval("Subject") %>' />
             </td>
             <td>
                 <asp:Label ID="bodyLabel" runat="server" Text='<%# Eval("body") %>' />
             </td>
             <td>
                 <asp:Label ID="CommentDateLabel" runat="server" 
                     Text='<%# Eval("CommentDate") %>' />
             </td>
         </tr>
     </SelectedItemTemplate>
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSource4" runat="server" 
    ConnectionString="<%$ ConnectionStrings:myConn %>" 
    ProviderName="System.Data.SqlClient" 
    
        SelectCommand="SELECT aspnet_Users.UserName, Comments.Subject, Comments.body, Comments.CommentDate FROM aspnet_Users INNER JOIN Comments ON aspnet_Users.UserId = Comments.userID ORDER BY Comments.CommentDate DESC">
</asp:SqlDataSource>
</asp:Content>